package cn.qinhao.pethome.basic.until;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class AjaxResult {
    private Boolean success;
    private String message;
    private Object data;//用于返回路径
    public static AjaxResult me(){
        return new AjaxResult() ;
    }

    public AjaxResult  setSuccess(Boolean success) {
        this.success = success;
        return this ;
    }

    public AjaxResult setMessage(String message) {
        this.message = message;
        return this ;
    }

    public AjaxResult setResultObj(Object o){
        this.data = o;
        return this;//链式编程返回路径
    }
}
